package com.legrand.www.module.exception.exception;


import com.legrand.www.module.exception.enums.ExceptionEnum;

/**
 * @author xiah
 * 2018-06-22 01:30:49
 * description 自定义异常 用来拦截controller及以下异常 无法拦截zuul级别异常
 */

public class CustomizeException extends RuntimeException {
    public String code;
    public String mes;

    public CustomizeException(String code, String mes) {
        super(mes);
        this.code = code;
        this.mes = mes;
    }

    public CustomizeException(String code) {
        this.code = code;
        this.mes = ExceptionEnum.HAVE_NO_RIGHT.message;
    }

    public CustomizeException() {
        super();
    }

    public CustomizeException(String message, String code, String mes) {
        super(message);
        this.code = code;
        this.mes = mes;
    }
}
